export type IFoodSegment = 'recipe' | 'daily' | 'timeline'

/**
 * 食材信息
 */
export interface IMaterial {
  type: string;
  name: string;
  amount: string;
}

/**
 * 步骤信息
 */
export interface IStep {
  sort: number;
  content: string;
  imageUrl: string;
}

export interface IComment {
  id: number;
  username: string;
  avatar: string;
  content: string;
  date: string;
}

/**
 * 成果信息
 */
export interface IRecord {
  id: number;
  name: string;
  category: string;
  person: string;
  date: string;
  imageUrl: string;
}

/**
 * 菜谱信息
 */
export interface IRecipe {
  id?: number;
  /**
   * 美食名称
   */
  name: string;
  /**
   * 美食菜系
   */
  category: string;
  /**
   * 推荐指数
   */
  recommendRate: number;
  /**
   * 备注
   */
  remark: string;
  isShare: boolean;
  userId?: number;
  username?: string;
  avatar?: string;
  /**
   * 食材
   */
  materialList: IMaterial[];
  /**
   * 步骤
   */
  stepList: IStep[];
  /**
   * 成果
   */
  recordList: IRecord[];
  likeList?: number[];
  likeCount?: number;
  favouriteList?: number[];
  favouriteCount?: number;
  commentList?: IComment[];
  commentCount?: number;
}

/**
 * 统计信息
 */
export interface IStats {
  recipeCount: number;
  categoryCount: number;
  workCount: number;
}

export interface IFoodQuery {
  category: string;
}

export interface IMoment {
  id?: number;
  userId?: number;
  username?: string;
  avatar?: string;
  content: string;
  imageList: string[];
  date?: string;
  likeList?: number[];
  commentList?: IComment[];
}
